#include <stdio.h>
int main()
{
    int n,k,i,j;
    float s=0,t=1;
    scanf("%d",&n);
    for (i=0;i<n;i++)
    {
        scanf("%d",&k);
        t=1;
        for (j=1;j<=k;j++)
        {
            s+=1.0/j*t;
            t=-t;
        }
        printf("%.2f\n",s);
        s=0;
    }
    return 0;
}
